
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <link rel="canonical" href="https://blog.csdn.net/zhiguigu/article/details/116158446"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content='{"pid": "blog", "spm":"1001.2101"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link  href="https://g.csdnimg.cn/static/logo/favicon32.ico"  rel="shortcut icon" type="image/x-icon" />
    <title>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实_关注我-CSDN博客</title>
    <script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实"}'>
    <meta name="description" content="检验Python基本功很适合">
    <script src="//g.csdnimg.cn/tingyun/1.8.5/blog.js" type='text/javascript'></script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/css/detail_enter-049c37bb43.min.css">
    <style>
        #content_views pre{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
        #content_views pre code{
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none; 
            user-select: none; 
        }
    </style>
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/zhiguigu/article/details/116158446","appid":"1638831770136827","pubDate":"2021-04-26T15:41:27","title":"Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实_关注我-CSDN博客","upDate":"2021-09-16T19:24:34"}</script>
        <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/release/blogv2/dist/pc/themesSkin/skin-code/skin-code-ec0336e729.min.css">
    <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "zhiguigu";
        var skinImg = "white";
        var blog_address = "https://sslljy.blog.csdn.net";
        var currentUserName = "";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/zhiguigu/article/details/116158446";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile.csdnimg.cn/9/0/1/3_zhiguigu";
        var articleTitle = "Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实";
        var articleDesc = "检验Python基本功很适合";
        var articleTitles = "Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实_关注我-CSDN博客";
        var nickName = "退休的龙叔";
        var articleDetailUrl = "https://sslljy.blog.csdn.net/article/details/116158446";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
    </script>
    <script src="https://g.csdnimg.cn/??fixed-sidebar/1.1.6/fixed-sidebar.js" type="text/javascript"></script>
    <script src='//g.csdnimg.cn/common/csdn-report/report.js' type='text/javascript'></script>
    <link rel="stylesheet" type="text/css" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="https://dup.baidustatic.com/js/ds.js"></script>
</head>
<body class="nodata " style="">
        <script>
            var toolbarSearchExt = '{"landingWord":[],"queryWord":"","tag":["python","编程语言","程序员","函数闭包","列表"],"title":"Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实"}';
        </script>
    <script src="https://g.csdnimg.cn/common/csdn-toolbar/csdn-toolbar.js" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/pc/css/blog_code-01256533b5.min.css">
<link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/chart-3456820cac.css" />
<div class="main_father clearfix d-flex justify-content-center" style="height:100%;"> 
    <div class="container clearfix" id="mainBox">
        <main>
<script type="text/javascript">
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs; 
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
        <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/original.png" alt="">
                    <div class="bar-content">
                    <a class="follow-nickName " href="https://sslljy.blog.csdn.net" target="_blank" rel="noopener">退休的龙叔</a>
                    <span class="time">2021-09-16 19:24:34</span>
                    <img class="article-read-img article-heard-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/articleReadEyes.png" alt="">
                    <span class="read-count">1330</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click='{"mod":"popu_823","spm":"1001.2101.3001.4232","ab":"new"}'>
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollect.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection">
                            81
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/zhiguigu/category_11347049.html" target="_blank" rel="noopener">Python新手入门教程</a>
                            <span class="label">文章标签：</span>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"python","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtjaQg4sNDk0LWJsb2cO0O0O.html" target="_blank" rel="noopener">python</a>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"编程语言","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtTaEg0sMTA0OTctYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">编程语言</a>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"程序员","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtTaEg0sMTI0MzQtYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">程序员</a>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"函数闭包","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/Mtjakg2sMzE5MTEtYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">函数闭包</a>
                                <a data-report-click='{"mod":"popu_626","spm":"1001.2101.3001.4223","strategy":"列表","ab":"new"}' class="tag-link" href="https://www.csdn.net/tags/MtTaEg0sNDkzOTAtYmxvZwO0O0OO0O0O.html" target="_blank" rel="noopener">列表</a>
                            <a class="origin-plan-box" data-report-click='{"spm":"1001.2101.3001.5794"}' href="https://marketing.csdn.net/p/55d59e00e66e4d3796149b096ae7c810" target="_blank">
                                <img src="https://csdnimg.cn/release/blogv2/dist/components/img/originPlan.png" alt=""><span class="origin-plan-name">原力计划</span>
                            </a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/zhiguigu/article/details/116158446" target="_blank">https://blog.csdn.net/zhiguigu/article/details/116158446</a>
                        </div>
                    </div>
                </div>
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 column-group-item-one">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/zhiguigu/category_11347049.html" target="_blank" title="Python新手入门教程"
                        data-report-view='{"spm":"1001.2101.3001.6332"}'
                        data-report-click='{"spm":"1001.2101.3001.6332"}'>
                            <img class="item-target" src="https://img-blog.csdnimg.cn/20210910094850758.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224" alt="">
                            <span class="title item-target">Python新手入门教程</span>
                        </a>
                        <span class="dec">专栏收录该内容</span>
                    </div>
                    <div class="item-m">
                        <span>4 篇文章</span>
                        <span>698 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="11347049">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/ck_htmledit_views-1a85854398.css">
                <div id="content_views" class="markdown_views prism-tomorrow-night">
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <p>继上次的<a href="https://sslljy.blog.csdn.net/article/details/120217658">【❤️万字【Python基础】保姆式教学❤️&#xff0c;小白快速入门Python&#xff01;</a>】之后&#xff0c;结尾的时候给大家留了一个名片管理系统的练手项目&#xff0c;但是没有告诉大家谜底&#xff0c;让大家去练手。</p> 
<p>本来是不准备讲的&#xff0c;因为比较基础&#xff0c;但有很多粉丝私信我说这个项目还是得讲一讲才好&#xff0c;那么今天我来讲一下这个简单版本的名片管理系统的项目。</p> 
<p>项目虽然简单&#xff0c;但结合了变量、流程控制、函数等知识&#xff0c;我觉得在你学完了基础入门之后&#xff0c;拿它来检验一下学习情况还是可以的。</p> 
<p>俗话说得好“底层基础决定上层建筑”&#xff0c;只有掌握了这些基础知识之后&#xff0c;你才能在后续的爬虫、web前后端开发以及数据分析等方向上一往无前&#xff0c;Python基础知识没学好&#xff0c;再勉强去学习其他知识就会很飘。</p> 
<p><strong>学过的Python的应该写这个玩意儿是没有问题的&#xff0c;如果你连这个小项目都写不出来&#xff0c;那么你是应该再好好补补Python的基础知识了。</strong></p> 
<hr /> 
<h2><a id="_13"></a>一、系统需求</h2> 
<ol><li>程序启动&#xff0c;显示名片管理系统欢迎界面&#xff0c;并显示功能菜单</li></ol> 
<pre><code>**************************************************
欢迎使用【名片管理系统】V1.0

1. 新建名片
2. 显示全部
3. 查询名片

0. 退出系统
**************************************************
</code></pre> 
<ol start="2"><li>用户用数字选择不同的功能</li><li>根据功能选择&#xff0c;执行不同的功能</li><li>用户名片需要记录用户的 <strong>姓名</strong>、<strong>电话</strong>、<strong>QQ</strong>、<strong>邮件</strong></li><li>如果查询到指定的名片&#xff0c;用户可以选择 <strong>修改</strong> 或者 <strong>删除</strong> 名片</li></ol> 
<hr /> 
<h2><a id="_34"></a>二、效果预览</h2> 
<p>大概了解了这个操作系统的需求之后&#xff0c;我们先不忙着看代码&#xff0c;我们先来看看代码运行后的效果&#xff0c;这就是我们要做的东西&#xff1a;</p> 
<p></p>
<div class="csdn-video-box">
 <iframe id="nfyNRey6-1619426689674" src="https://player.bilibili.com/player.html?aid&#61;375330352" allowfullscreen="true" data-mediaembed="bilibili"></iframe>
 <p>Python练手项目之名片管理系统演示</p>
</div>
<p></p> 
<hr /> 
<h2><a id="_41"></a>三、总体思路</h2> 
<p><img src="https://img-blog.csdnimg.cn/2021042616503631.png?x-oss-process&#61;image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3poaWd1aWd1,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述" /></p> 
<hr /> 
<h2><a id="_45"></a>四、代码讲解</h2> 
<h3><a id="01__47"></a>01. 框架搭建</h3> 
<p><strong>目标</strong></p> 
<ul><li> <p>搭建名片管理系统 <strong>框架结构</strong></p> 
  <ol><li><strong>准备文件</strong>&#xff0c;确定文件名&#xff0c;保证能够 <strong>在需要的位置</strong> 编写代码</li><li>编写 <strong>主运行循环</strong>&#xff0c;实现基本的 <strong>用户输入和判断</strong></li></ol> </li></ul> 
<hr /> 
<h4><a id="11__57"></a>1.1 文件准备</h4> 
<ol><li>新建 <code>cards_main.py</code> 保存 <strong>主程序功能代码</strong> 
  <ul><li>程序的入口</li><li>每一次启动名片管理系统都通过 <code>main</code> 这个文件启动</li></ul> </li><li>新建 <code>cards_tools.py</code> 保存 <strong>所有名片功能函数</strong> 
  <ul><li>将对名片的 <strong>新增</strong>、<strong>查询</strong>、<strong>修改</strong>、<strong>删除</strong> 等功能封装在不同的函数中</li></ul> </li></ol> 
<h4><a id="12__65"></a>1.2 编写主运行循环</h4> 
<ul><li>在 <code>cards_main</code> 中添加一个 <strong>无限循环</strong></li></ul> 
<pre><code class="prism language-python"><span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>

    <span class="token comment"># TODO(小明) 显示系统菜单</span>

    action <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请选择操作功能&#xff1a;&#34;</span><span class="token punctuation">)</span>

    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;您选择的操作是&#xff1a;%s&#34;</span> <span class="token operator">%</span> action<span class="token punctuation">)</span>

    <span class="token comment"># 根据用户输入决定后续的操作</span>
    <span class="token keyword">if</span> action <span class="token keyword">in</span> <span class="token punctuation">[</span><span class="token string">&#34;1&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;3&#34;</span><span class="token punctuation">]</span><span class="token punctuation">:</span>
        <span class="token keyword">pass</span>
    <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;0&#34;</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;欢迎再次使用【名片管理系统】&#34;</span><span class="token punctuation">)</span>

        <span class="token keyword">break</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;输入错误&#xff0c;请重新输入&#34;</span><span class="token punctuation">)</span>

</code></pre> 
<h5><a id="_90"></a>字符串判断</h5> 
<pre><code class="prism language-python"><span class="token keyword">if</span> action <span class="token keyword">in</span> <span class="token punctuation">[</span><span class="token string">&#34;1&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;3&#34;</span><span class="token punctuation">]</span><span class="token punctuation">:</span>
</code></pre> 
<pre><code class="prism language-python"><span class="token keyword">if</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;1&#34;</span> <span class="token keyword">or</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;2&#34;</span> <span class="token keyword">or</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;3&#34;</span><span class="token punctuation">:</span>
</code></pre> 
<ol><li>使用 <code>in</code> 针对 <strong>列表</strong> 判断&#xff0c;避免使用 <code>or</code> 拼接复杂的逻辑条件</li><li>没有使用 <code>int</code> 转换用户输入&#xff0c;可以避免 <strong>一旦用户输入的不是数字</strong>&#xff0c;导致程序运行出错</li></ol> 
<h5><a id="pass_103"></a>pass</h5> 
<ul><li><code>pass</code> 就是一个空语句&#xff0c;不做任何事情&#xff0c;一般用做占位语句</li><li>是为了保持程序结构的完整性</li></ul> 
<h5><a id="_108"></a>无限循环</h5> 
<ul><li>在开发软件时&#xff0c;如果 <strong>不希望程序执行后</strong> 立即退出</li><li>可以在程序中增加一个 <strong>无限循环</strong></li><li><strong>由用户来决定</strong> 退出程序的时机</li></ul> 
<h5><a id="TODO__114"></a>TODO 注释</h5> 
<ul><li>在 <code>#</code> 后跟上 <code>TODO</code>&#xff0c;用于标记需要去做的工作</li></ul> 
<pre><code class="prism language-python"><span class="token comment"># TODO(作者/邮件) 显示系统菜单</span>
</code></pre> 
<h4><a id="13__cards_tools__122"></a>1.3 在 <code>cards_tools</code> 中增加四个新函数</h4> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">show_menu</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示菜单
    &#34;&#34;&#34;</span>
    <span class="token keyword">pass</span>

<span class="token keyword">def</span> <span class="token function">new_card</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;新建名片
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;新建名片&#34;</span><span class="token punctuation">)</span>


<span class="token keyword">def</span> <span class="token function">show_all</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示全部
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;显示全部&#34;</span><span class="token punctuation">)</span>


<span class="token keyword">def</span> <span class="token function">search_card</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;搜索名片
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;搜索名片&#34;</span><span class="token punctuation">)</span>

</code></pre> 
<h4><a id="14__156"></a>1.4 导入模块</h4> 
<ul><li>在 <code>cards_main.py</code> 中使用 <code>import</code> 导入 <code>cards_tools</code> 模块</li></ul> 
<pre><code class="prism language-python"><span class="token keyword">import</span> cards_tools
</code></pre> 
<ul><li>修改 <code>while</code> 循环的代码如下&#xff1a;</li></ul> 
<pre><code class="prism language-python"><span class="token keyword">import</span> cards_tools

<span class="token keyword">while</span> <span class="token boolean">True</span><span class="token punctuation">:</span>

    cards_tools<span class="token punctuation">.</span>show_menu<span class="token punctuation">(</span><span class="token punctuation">)</span>

    action <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请选择操作功能&#xff1a;&#34;</span><span class="token punctuation">)</span>

    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;您选择的操作是&#xff1a;%s&#34;</span> <span class="token operator">%</span> action<span class="token punctuation">)</span>

    <span class="token comment"># 根据用户输入决定后续的操作</span>
    <span class="token keyword">if</span> action <span class="token keyword">in</span> <span class="token punctuation">[</span><span class="token string">&#34;1&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;3&#34;</span><span class="token punctuation">]</span><span class="token punctuation">:</span>

        <span class="token keyword">if</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;1&#34;</span><span class="token punctuation">:</span>
            cards_tools<span class="token punctuation">.</span>new_card<span class="token punctuation">(</span><span class="token punctuation">)</span>

        <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">:</span>
            cards_tools<span class="token punctuation">.</span>show_all<span class="token punctuation">(</span><span class="token punctuation">)</span>

        <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;3&#34;</span><span class="token punctuation">:</span>
            cards_tools<span class="token punctuation">.</span>search_card<span class="token punctuation">(</span><span class="token punctuation">)</span>

    <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;0&#34;</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;欢迎再次使用【名片管理系统】&#34;</span><span class="token punctuation">)</span>

        <span class="token keyword">break</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;输入错误&#xff0c;请重新输入&#xff1a;&#34;</span><span class="token punctuation">)</span>

</code></pre> 
<blockquote> 
 <p>至此&#xff1a;<code>cards_main</code> 中的所有代码全部开发完毕&#xff01;</p> 
</blockquote> 
<h4><a id="15__show_menu__201"></a>1.5 完成 <code>show_menu</code> 函数</h4> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">show_menu</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示菜单
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;*&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;欢迎使用【菜单管理系统】V1.0&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;1. 新建名片&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;2. 显示全部&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;3. 查询名片&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;0. 退出系统&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;*&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>

</code></pre> 
<hr /> 
<h3><a id="02__220"></a>02. 保存名片数据的结构</h3> 
<p><strong>程序就是用来处理数据的&#xff0c;而变量就是用来存储数据的</strong></p> 
<ul><li>使用 <strong>字典</strong> 记录 <strong>每一张名片</strong> 的详细信息</li><li>使用 <strong>列表</strong> 统一记录所有的 <strong>名片字典</strong></li></ul> 
<h4><a id="_229"></a>定义名片列表变量</h4> 
<ul><li>在 <code>cards_tools</code> 文件的顶部增加一个 <strong>列表变量</strong></li></ul> 
<pre><code class="prism language-python"><span class="token comment"># 所有名片记录的列表</span>
card_list <span class="token operator">&#61;</span> <span class="token punctuation">[</span><span class="token punctuation">]</span>
</code></pre> 
<p><strong>注意</strong></p> 
<ol><li><strong>所有名片相关操作</strong>&#xff0c;都需要使用这个列表&#xff0c;所以应该 <strong>定义在程序的顶部</strong></li><li><strong>程序刚运行时&#xff0c;没有数据</strong>&#xff0c;所以是 <strong>空列表</strong></li></ol> 
<hr /> 
<h3><a id="03__245"></a>03. 新增名片</h3> 
<h4><a id="31__247"></a>3.1 功能分析</h4> 
<ol><li>提示用户依次输入名片信息</li><li>将名片信息保存到一个字典</li><li>将字典添加到名片列表</li><li>提示名片添加完成</li></ol> 
<h4><a id="32__new_card__254"></a>3.2 实现 new_card 方法</h4> 
<ul><li>根据步骤实现代码</li></ul> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">new_card</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;新建名片
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;新建名片&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 1. 提示用户输入名片信息</span>
    name <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入姓名&#xff1a;&#34;</span><span class="token punctuation">)</span>
    phone <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入电话&#xff1a;&#34;</span><span class="token punctuation">)</span>
    qq <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入 QQ 号码&#xff1a;&#34;</span><span class="token punctuation">)</span>
    email <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入邮箱&#xff1a;&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 2. 将用户信息保存到一个字典</span>
    card_dict <span class="token operator">&#61;</span> <span class="token punctuation">{<!-- --></span><span class="token string">&#34;name&#34;</span><span class="token punctuation">:</span> name<span class="token punctuation">,</span>
                 <span class="token string">&#34;phone&#34;</span><span class="token punctuation">:</span> phone<span class="token punctuation">,</span>
                 <span class="token string">&#34;qq&#34;</span><span class="token punctuation">:</span> qq<span class="token punctuation">,</span>
                 <span class="token string">&#34;email&#34;</span><span class="token punctuation">:</span> email<span class="token punctuation">}</span>

    <span class="token comment"># 3. 将用户字典添加到名片列表</span>
    card_list<span class="token punctuation">.</span>append<span class="token punctuation">(</span>card_dict<span class="token punctuation">)</span>

    <span class="token keyword">print</span><span class="token punctuation">(</span>card_list<span class="token punctuation">)</span>
    
    <span class="token comment"># 4. 提示添加成功信息</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;成功添加 %s 的名片&#34;</span> <span class="token operator">%</span> card_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

</code></pre> 
<blockquote> 
 <p>技巧&#xff1a;在 <code>PyCharm</code> 中&#xff0c;可以使用 <code>SHIFT &#43; F6</code> 统一修改变量名</p> 
</blockquote> 
<hr /> 
<h3><a id="04__291"></a>04. 显示所有名片</h3> 
<h4><a id="41__293"></a>4.1 功能分析</h4> 
<ul><li>循环遍历名片列表&#xff0c;顺序显示每一个字典的信息</li></ul> 
<h4><a id="42__297"></a>4.2 基础代码实现</h4> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">show_all</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示全部
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;显示全部&#34;</span><span class="token punctuation">)</span>

    <span class="token keyword">for</span> card_dict <span class="token keyword">in</span> card_list<span class="token punctuation">:</span>

        <span class="token keyword">print</span><span class="token punctuation">(</span>card_dict<span class="token punctuation">)</span>
        
</code></pre> 
<ul><li>显示效果不好&#xff01;</li></ul> 
<h4><a id="43__t__315"></a>4.3 增加标题和使用 <code>\t</code> 显示</h4> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">show_all</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示全部
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;显示全部&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 打印表头</span>
    <span class="token keyword">for</span> name <span class="token keyword">in</span> <span class="token punctuation">[</span><span class="token string">&#34;姓名&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;电话&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;QQ&#34;</span><span class="token punctuation">,</span> <span class="token string">&#34;邮箱&#34;</span><span class="token punctuation">]</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span>name<span class="token punctuation">,</span> end<span class="token operator">&#61;</span><span class="token string">&#34;\t\t&#34;</span><span class="token punctuation">)</span>

    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 打印分隔线</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;&#61;&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>

    <span class="token keyword">for</span> card_dict <span class="token keyword">in</span> card_list<span class="token punctuation">:</span>

        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;%s\t\t%s\t\t%s\t\t%s&#34;</span> <span class="token operator">%</span> <span class="token punctuation">(</span>card_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                                        card_dict<span class="token punctuation">[</span><span class="token string">&#34;phone&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                                        card_dict<span class="token punctuation">[</span><span class="token string">&#34;qq&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                                        card_dict<span class="token punctuation">[</span><span class="token string">&#34;email&#34;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
</code></pre> 
<h4><a id="44__341"></a>4.4 增加没有名片记录判断</h4> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">show_all</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token triple-quoted-string string">&#34;&#34;&#34;显示全部
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;显示全部&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 1. 判断是否有名片记录</span>
    <span class="token keyword">if</span> <span class="token builtin">len</span><span class="token punctuation">(</span>card_list<span class="token punctuation">)</span> <span class="token operator">&#61;&#61;</span> <span class="token number">0</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;提示&#xff1a;没有任何名片记录&#34;</span><span class="token punctuation">)</span>

        <span class="token keyword">return</span>

</code></pre> 
<p><strong>注意</strong></p> 
<ul><li>在函数中使用 <code>return</code> 表示返回</li><li>如果在 <code>return</code> 后没有跟任何内容&#xff0c;只是表示该函数执行到此就不再执行后续的代码</li></ul> 
<hr /> 
<h3><a id="05__365"></a>05. 查询名片</h3> 
<h4><a id="51__367"></a>5.1 功能分析</h4> 
<ol><li>提示用户要搜索的姓名</li><li>根据用户输入的姓名遍历列表</li><li>搜索到指定的名片后&#xff0c;再执行后续的操作</li></ol> 
<h4><a id="52__373"></a>5.2 代码实现</h4> 
<ul><li>查询功能实现</li></ul> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">search_card</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;搜索名片
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">50</span><span class="token punctuation">)</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;功能&#xff1a;搜索名片&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 1. 提示要搜索的姓名</span>
    find_name <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入要搜索的姓名&#xff1a;&#34;</span><span class="token punctuation">)</span>

    <span class="token comment"># 2. 遍历字典</span>
    <span class="token keyword">for</span> card_dict <span class="token keyword">in</span> card_list<span class="token punctuation">:</span>

        <span class="token keyword">if</span> card_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span> <span class="token operator">&#61;&#61;</span> find_name<span class="token punctuation">:</span>

            <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;姓名\t\t\t电话\t\t\tQQ\t\t\t邮箱&#34;</span><span class="token punctuation">)</span>
            <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">40</span><span class="token punctuation">)</span>
            
            <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;%s\t\t\t%s\t\t\t%s\t\t\t%s&#34;</span> <span class="token operator">%</span> <span class="token punctuation">(</span>
                card_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                card_dict<span class="token punctuation">[</span><span class="token string">&#34;phone&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                card_dict<span class="token punctuation">[</span><span class="token string">&#34;qq&#34;</span><span class="token punctuation">]</span><span class="token punctuation">,</span>
                card_dict<span class="token punctuation">[</span><span class="token string">&#34;email&#34;</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>

            <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;-&#34;</span> <span class="token operator">*</span> <span class="token number">40</span><span class="token punctuation">)</span>
            
            <span class="token comment"># TODO(小明) 针对找到的字典进行后续操作&#xff1a;修改/删除</span>

            <span class="token keyword">break</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;没有找到 %s&#34;</span> <span class="token operator">%</span> find_name<span class="token punctuation">)</span>

</code></pre> 
<ul><li>增加名片操作函数&#xff1a;<strong>修改</strong>/<strong>删除</strong>/<strong>返回主菜单</strong></li></ul> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">deal_card</span><span class="token punctuation">(</span>find_dict<span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;操作搜索到的名片字典

    :param find_dict:找到的名片字典
    &#34;&#34;&#34;</span>
    <span class="token keyword">print</span><span class="token punctuation">(</span>find_dict<span class="token punctuation">)</span>

    action_str <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请选择要执行的操作 &#34;</span>
                       <span class="token string">&#34;[1] 修改 [2] 删除 [0] 返回上级菜单&#34;</span><span class="token punctuation">)</span>

    <span class="token keyword">if</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;1&#34;</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;修改&#34;</span><span class="token punctuation">)</span>
    <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">:</span>
        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;删除&#34;</span><span class="token punctuation">)</span>

</code></pre> 
<hr /> 
<h3><a id="06__433"></a>06. 修改和删除</h3> 
<h4><a id="61__435"></a>6.1 查询成功后删除名片</h4> 
<ul><li>由于找到的字典记录已经在列表中保存</li><li>要删除名片记录&#xff0c;只需要把列表中对应的字典删除即可</li></ul> 
<pre><code class="prism language-python">    <span class="token keyword">elif</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;2&#34;</span><span class="token punctuation">:</span>
        card_list<span class="token punctuation">.</span>remove<span class="token punctuation">(</span>find_dict<span class="token punctuation">)</span>

        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;删除成功&#34;</span><span class="token punctuation">)</span>
</code></pre> 
<h4><a id="62__447"></a>6.2 修改名片</h4> 
<ul><li>由于找到的字典记录已经在列表中保存</li><li>要修改名片记录&#xff0c;只需要把列表中对应的字典中每一个键值对的数据修改即可</li></ul> 
<pre><code class="prism language-python">    <span class="token keyword">if</span> action <span class="token operator">&#61;&#61;</span> <span class="token string">&#34;1&#34;</span><span class="token punctuation">:</span>

        find_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入姓名&#xff1a;&#34;</span><span class="token punctuation">)</span>
        find_dict<span class="token punctuation">[</span><span class="token string">&#34;phone&#34;</span><span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入电话&#xff1a;&#34;</span><span class="token punctuation">)</span>
        find_dict<span class="token punctuation">[</span><span class="token string">&#34;qq&#34;</span><span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入QQ&#xff1a;&#34;</span><span class="token punctuation">)</span>
        find_dict<span class="token punctuation">[</span><span class="token string">&#34;email&#34;</span><span class="token punctuation">]</span> <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span><span class="token string">&#34;请输入邮件&#xff1a;&#34;</span><span class="token punctuation">)</span>

        <span class="token keyword">print</span><span class="token punctuation">(</span><span class="token string">&#34;%s 的名片修改成功&#34;</span> <span class="token operator">%</span> find_dict<span class="token punctuation">[</span><span class="token string">&#34;name&#34;</span><span class="token punctuation">]</span><span class="token punctuation">)</span>

</code></pre> 
<h5><a id="_464"></a>修改名片细化</h5> 
<ul><li><strong>如果用户在使用时&#xff0c;某些名片内容并不想修改</strong>&#xff0c;应该如何做呢&#xff1f;—— 既然系统提供的 <code>input</code> 函数不能满足需求&#xff0c;那么就新定义一个函数 <code>input_card_info</code> 对系统的 <code>input</code> 函数进行扩展</li></ul> 
<pre><code class="prism language-python"><span class="token keyword">def</span> <span class="token function">input_card_info</span><span class="token punctuation">(</span>dict_value<span class="token punctuation">,</span> tip_message<span class="token punctuation">)</span><span class="token punctuation">:</span>

    <span class="token triple-quoted-string string">&#34;&#34;&#34;输入名片信息

    :param dict_value: 字典原有值
    :param tip_message: 输入提示信息
    :return: 如果输入&#xff0c;返回输入内容&#xff0c;否则返回字典原有值
    &#34;&#34;&#34;</span>
    <span class="token comment"># 1. 提示用户输入内容</span>
    result_str <span class="token operator">&#61;</span> <span class="token builtin">input</span><span class="token punctuation">(</span>tip_message<span class="token punctuation">)</span>

    <span class="token comment"># 2. 针对用户的输入进行判断&#xff0c;如果用户输入了内容&#xff0c;直接返回结果</span>
    <span class="token keyword">if</span> <span class="token builtin">len</span><span class="token punctuation">(</span>result_str<span class="token punctuation">)</span> <span class="token operator">&gt;</span> <span class="token number">0</span><span class="token punctuation">:</span>

        <span class="token keyword">return</span> result_str
    <span class="token comment"># 3. 如果用户没有输入内容&#xff0c;返回 &#96;字典中原有的值&#96;</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>

        <span class="token keyword">return</span> dict_value

</code></pre> 
<hr /> 
<h3><a id="07_LINUX__Shebang__491"></a>07. LINUX 上的 <code>Shebang</code> 符号(<code>#!</code>)</h3> 
<ul><li><code>#!</code>这个符号叫做 <code>Shebang</code> 或者 <code>Sha-bang</code></li><li><code>Shebang</code> 通常在 <code>Unix</code> 系统脚本的中 <strong>第一行开头</strong> 使用</li><li>指明 <strong>执行这个脚本文件</strong> 的 <strong>解释程序</strong></li></ul> 
<h4><a id="_Shebang__497"></a>使用 Shebang 的步骤</h4> 
<ul><li> 
  <ol><li>使用 <code>which</code> 查询 <code>python3</code> 解释器所在路径</li></ol> </li></ul> 
<pre><code class="prism language-bash">$ <span class="token function">which</span> python3
</code></pre> 
<ul><li> 
  <ol start="2"><li>修改要运行的 <strong>主 python 文件</strong>&#xff0c;在第一行增加以下内容</li></ol> </li></ul> 
<pre><code class="prism language-python"><span class="token comment">#! /usr/bin/python3</span>
</code></pre> 
<ul><li> 
  <ol start="3"><li>修改 <strong>主 python 文件</strong> 的文件权限&#xff0c;增加执行权限</li></ol> </li></ul> 
<pre><code class="prism language-bash">$ <span class="token function">chmod</span> &#43;x cards_main.py
</code></pre> 
<ul><li> 
  <ol start="4"><li>在需要时执行程序即可</li></ol> </li></ul> 
<pre><code class="prism language-bash">./cards_main.py
</code></pre> 
<hr /> 
<h2><a id="_517"></a>结语</h2> 
<p>这里面虽然有一些拓展知识&#xff0c;但也不要小瞧自己&#xff0c;况且做开发这条路上少不了要触及到一些你没学过的东西&#xff0c;难到我们都不做了吗&#xff1f;加油&#xff01;</p> 
<p>这个项目还是比较简单的&#xff0c;看完上面的解析你自己琢磨琢磨应该是可以写出来的&#xff0c;当然了&#xff0c;源码也是可以私聊我的&#xff0c;都可以贡献的&#xff0c;加油&#xff01;<br /> <img src="https://img-blog.csdnimg.cn/20210421162557587.png?x-oss-process&#61;image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3poaWd1aWd1,size_16,color_FFFFFF,t_70" alt="在这里插入图片描述" /></p>
                </div>
                <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/editerView/markdown_views-d7a94ec6ab.css" rel="stylesheet">
                <link href="https://csdnimg.cn/release/blogv2/dist/mdeditor/css/style-49037e4d27.css" rel="stylesheet">
        </div>
    </article>
</div>
<div class="more-toolbox-new" id="toolBarBox">
    <div class="left-toolbox">
        <div class="toolbox-left">
            <div class="profile-box"><a class="profile-href" target="_blank" href="https://sslljy.blog.csdn.net"><img class="profile-img" src="https://profile.csdnimg.cn/9/0/1/3_zhiguigu"><span class="profile-name">退休的龙叔</span></a></div>
            <div class="profile-attend">
                    <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;" data-report-view='{"mod":"1592215036_002","spm":"1001.2101.3001.4232","extend1":"关注"}'>关注</a>
                <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
        <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
            <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart1Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHeart1White.png" alt="">  
                <span id="spanCount" class="count ">
                        31
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active tool-item-comment">
            <a class="tool-item-href" href="#commentBox">
                <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCommentWhite.png" alt="">
                <span class="count">
                    21
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
            <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"popu_824","spm":"1001.2101.3001.4130","ab":"new"}'>
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="https://csdnimg.cn/release/blogv2/dist/pc/img/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectWhite.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newCollectActive.png" alt="">
                <span class="count get-collection " id="get-collection">
                    81
                </span>
            </a>
            <div class="tool-hover-tip"><span class="text space">收藏</span></div>
            </li>
            <li class="tool-item tool-active">
                <a class="" href="javascript:;">
                    <img class="company active" id="health-companies" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newHealthCompanies1Active.gif" alt="一键三连">
                </a>
                <div class="tool-hover-tip three-click"><span class="text">一键三连</span></div>
            </li>
            <li class="tool-item tool-item-bar">
            </li>
            <li class="tool-item tool-item-size tool-active tool-QRcode" id="tool-share">
                <a class="tool-item-href" href="javascript:;" data-report-click='{"mod":"1582594662_002","spm":"1001.2101.3001.4129","ab":"new"}'>
                    <img class="isdefault" src="https://csdnimg.cn/release/blogv2/dist/pc/img/newShareWhite.png" alt="">
                </a>
                <div class="QRcode" id="tool-QRcode">
                    <p class="title">
                    扫一扫，分享海报
                    </p>
                    <div id='shareCode'></div>
                </div>
            </li>
        </ul>
        </div>
        <div class="toolbox-right">
                <div class="tool-directory">
                    <a class="bt-columnlist-show"
                    data-id="11347049"
                    data-free="true"
                    data-subscribe="false"
                    data-title="Python新手入门教程"
                    data-img="https://img-blog.csdnimg.cn/20210910094850758.jpg?x-oss-process=image/resize,m_fixed,h_224,w_224"
                    data-url="https://blog.csdn.net/zhiguigu/category_11347049.html"
                    data-sum="4"
                    data-people="698"
                    data-price="0"
                    data-oldprice="0"
                    data-join="false"
                    data-studyvip="false"
                    data-studysubscribe="false"
                    data-report-view='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    data-report-click='{"spm":"1001.2101.3001.6334","extend1":"专栏目录"}'
                    >专栏目录</a>
                </div>
        </div>
    </div>  
</div>
<script type=text/javascript crossorigin src="https://csdnimg.cn/release/phoenix/production/qrcode-7c90a92189.min.js"></script>
<script src="//g.csdnimg.cn/??sharewx/1.2.1/sharewx.js" type="text/javascript"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/user-login/3.0.1/user-login.js"></script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/collection-box/2.0.6/collection-box.js"></script>
                <div class="first-recommend-box recommend-box">
<div class="recommend-item-box type_download clearfix" data-url="http://download.csdn.net/download/zhangtianxing007/3366914"  data-report-view='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"http://download.csdn.net/download/zhangtianxing007/3366914"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="http://download.csdn.net/download/zhangtianxing007/3366914" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"http://download.csdn.net/download/zhangtianxing007/3366914"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>名片</em><em>管理系统</em>完整版，包含数据库</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">06-15</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="http://download.csdn.net/download/zhangtianxing007/3366914" target="_blank"  data-report-click='{"ab":"new","mod":"popu_871","extra":"{\"utm_medium\":\"distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"http://download.csdn.net/download/zhangtianxing007/3366914"}'  data-report-query='utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">一个<em>名片</em><em>管理系统</em>，包含了上传<em>名片</em>资源，<em>名片</em>展示包含图片，MYSQL用存储过程，以及密码提示。附带简易的后台管理。</div>
			</a>
		</div>
	</div>
</div>
                </div>
            <div class="second-recommend-box recommend-box">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/mh_len_727/article/details/80358478"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/mh_len_727/article/details/80358478"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/mh_len_727/article/details/80358478" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/mh_len_727/article/details/80358478"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">ly_<em>Python</em>总结之六:本地<em>名片</em><em>管理系统</em>与数据库的结合</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/mh_len_727" target="_blank"><span class="blog-title">mh_len_727的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-17</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					322
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/mh_len_727/article/details/80358478" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-1.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"1","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/mh_len_727/article/details/80358478"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-1.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1"># -*- coding:utf-8 -*-
# @Author: mh
# @Time: 2018/3/25 14:49
# @说明:
&quot;&quot;&quot;对<em>名片</em><em>管理系统</em>进行改进
        1. 进行必要的封装，从面向过程改为面对对象的处理方式
        2. 用数据库的形式将信息存储在数据库中
            1.当用户对数据进行修改时，实际是对数据库进行修改
            2...</div>
			</a>
		</div>
	</div>
</div>
            </div>
<a id="commentBox" name="commentBox"></a>
<div class="comment-box">
	<div class="comment-edit-box d-flex">
		<a id="commentsedit"></a>
		<div class="user-img">
			<a href="javascript:void(0);" >
				<img class="show_loginbox" src="https://g.csdnimg.cn/static/user-img/anonymous-User-img.png">
			</a>
		</div>
		<form id="commentform">
			<img class="comment-sofa-flag" src="https://csdnimg.cn/release/blogv2/dist/pc/img/commentFlag@2x.png">
      <textarea class="comment-content" name="comment_content" id="comment_content" placeholder="优质评论可以帮助作者获得更高权重" maxlength="1000"></textarea>
			<div class="comment-emoticon"><img class="comment-emoticon-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="https://csdnimg.cn/release/blogv2/dist/pc/img/emoticon.png" alt="表情包"></div> 
      <span class="comment-emoticon-tip">插入表情</span>
      <div class="comment-emoticon-box">
        <div class="comment-emoticon-img-box"></div>
			</div>
      <div class="opt-box">
				<div id="ubbtools" class="add_code">
					<a href="#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a>
				</div>
				<input type="hidden" id="comment_replyId" name="comment_replyId">
				<input type="hidden" id="article_id" name="article_id" value="116158446">
				<input type="hidden" id="comment_userId" name="comment_userId" value="">
				<input type="hidden" id="commentId" name="commentId" value="">
				<div class="dropdown" id="myDrap">
					<a class="dropdown-face d-flex align-items-center" data-toggle="dropdown" role="button"
						aria-haspopup="true" aria-expanded="false">
						<div class="txt-selected text-truncate">添加代码片</div>
						<svg class="icon d-block" width="200px" height="100.00px" viewBox="0 0 2048 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"><path  d="M597.33333292 298.666667h853.333334L1023.99999992 725.333333 597.33333292 298.666667z"  /></svg>
					</a>
					<ul class="dropdown-menu" id="commentCode" aria-labelledby="drop4">
						<li><a data-code="html">HTML/XML</a></li>
						<li><a data-code="objc">objective-c</a></li>
						<li><a data-code="ruby">Ruby</a></li>
						<li><a data-code="php">PHP</a></li>
						<li><a data-code="csharp">C</a></li>
						<li><a data-code="cpp">C++</a></li>
						<li><a data-code="javascript">JavaScript</a></li>
						<li><a data-code="python">Python</a></li>
						<li><a data-code="java">Java</a></li>
						<li><a data-code="css">CSS</a></li>
						<li><a data-code="sql">SQL</a></li>
						<li><a data-code="plain">其它</a></li>
					</ul>
				</div>
				<div class="right-box" id="rightBox" data-type="2">
							<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
							<a data-report-click='{"mod":"1582594662_003","spm":"1001.2101.3001.4227","ab":"new"}'><input type="submit"
									class="btn btn-sm btn-comment" value="发表评论"></a>
				</div>
			</div>
		</form>
		<input type="button" class="bt-comment-show" value="评论">
	</div>
	<div class="comment-list-container">
		<a id="comments"></a>
		<div class="comment-list-box">
		</div>
		<div id="commentPage" class="pagination-box d-none"></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
		</div>
	</div>
</div>            <div class="recommend-box insert-baidu-box">
                <div class="recommend-item-box clearfix" style="display:none"></div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/wulvla020311/article/details/86080606"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/wulvla020311/article/details/86080606"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/wulvla020311/article/details/86080606" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/wulvla020311/article/details/86080606"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em> 写一个<em>简单</em>的<em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/wulvla020311" target="_blank"><span class="blog-title">W慕~的专栏</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-08</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1889
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/wulvla020311/article/details/86080606" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-2.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"2","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/wulvla020311/article/details/86080606"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-2.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">首先你要在电脑上装一个<em>Python</em>3.6，可以去官网下载https://www.<em>python</em>.org/downloads/

这里也是我自己学习的，一个<em>很</em><em>简单</em>的<em>名片</em><em>管理系统</em>，里面有最<em>简单</em>的新增<em>名片</em>、查询<em>名片</em>以及删除<em>名片</em>的操作

写这个博客也是为了让自己对<em>python</em>学习的一些笔记。<em>不</em>喜勿喷，谢谢

首先有两个文件，一个是main_card.py(这是一个主程序)，下面是代码


import ca...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_30701575/article/details/95407100"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_30701575/article/details/95407100"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_30701575/article/details/95407100" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_30701575/article/details/95407100"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em><em>基础</em>提高演练（<em>名片</em><em>管理系统</em>的开发）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_30701575" target="_blank"><span class="blog-title">weixin_30701575的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-18</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					84
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_30701575/article/details/95407100" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-3.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"3","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_30701575/article/details/95407100"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-3.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>综合</em>应用 &mdash;&mdash; <em>名片</em><em>管理系统</em>
目标
<em>综合</em>应用已经学习过的知识点：

变量
流程控制
<em>函数</em>
模块

开发<em>名片</em><em>管理系统</em>
系统需求

1. 程序启动，显示<em>名片</em><em>管理系统</em>欢迎界面，并显示功能菜单

**************************************************
欢迎使用<em>【</em><em>名片</em><em>管理系统</em><em>】</em>V1.0

1. 新建<em>名片</em>
2. 显示全部
3...</div>
			</a>
		</div>
	</div>
</div>
		<dl id="recommend-item-box-tow" class="recommend-item-box type_blog clearfix">
			
		</dl>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_43752167/article/details/89036722"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_43752167/article/details/89036722"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_43752167/article/details/89036722" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_43752167/article/details/89036722"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">初识<em>python</em>(三） 用<em>python</em>写一个<em>简单</em>的<em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_43752167" target="_blank"><span class="blog-title">weixin_43752167的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-04</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					321
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_43752167/article/details/89036722" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-4.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"4","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/weixin_43752167/article/details/89036722"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-4.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">import cards_tools
while True:
    # TODO 显示功能菜单
    cards_tools.show()
    action_str = input(&quot;请选择希望执行的操作： &quot;)
    print(&quot;你选择的操作是<em>【</em>%s<em>】</em>&quot; % action_str)
    # 1 2 3 针对<em>名片</em>的操作
    if action_str in [&quot;1&quot;, &quot;2&quot;,...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_43767691/article/details/101174440"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"5","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_43767691/article/details/101174440"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_43767691/article/details/101174440" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"5","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_43767691/article/details/101174440"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em><em>基础</em>-5（卡片<em>管理系统</em>）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_43767691" target="_blank"><span class="blog-title">weixin_43767691的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-22</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					293
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_43767691/article/details/101174440" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-5.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"5","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_43767691/article/details/101174440"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-5.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">主<em>函数</em>：
import cards_tools

while True:
    # TODO 显示功能菜单
    cards_tools.show_menu()

    action_str = input(&quot;请选择需要执行的操作：&quot;)
    print(&quot;您选择的操作是<em>【</em>%s<em>】</em>&quot; % action_str)

    if action_str in [&quot;1&quot;, &quot;2&quot;, &quot;3&quot;]:
 ...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_38868439/article/details/109122560"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_38868439/article/details/109122560"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_38868439/article/details/109122560" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_38868439/article/details/109122560"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">2020-10-16</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_38868439" target="_blank"><span class="blog-title">木夕的目</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-16</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					79
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_38868439/article/details/109122560" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-6.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"6","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_38868439/article/details/109122560"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-6.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>python</em><em>名片</em><em>管理系统</em>
card_main.py 主<em>函数</em>
import card_tools
# 无限循环，由用户主动决定什么时候退出循环
while True:

    # TODO 显示功能菜单
    card_tools.show_menu()
    action_str = input(&quot;请选择希望执行的操作：&quot;)
    print(&quot;您选择的操作是：%s&quot; % action_str)

    # 1,2,3针对<em>名片</em>的操作
    if action_str in [&quot;1&quot;,&quot;2&quot;,&quot;3</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/g_optimistic/article/details/86253127"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/g_optimistic/article/details/86253127"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/g_optimistic/article/details/86253127" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/g_optimistic/article/details/86253127"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Python</em>实现<em>名片</em><em>管理系统</em>======增删改查操作</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/g_optimistic" target="_blank"><span class="blog-title">也许会有_hui的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-10</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1062
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/g_optimistic/article/details/86253127" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-7.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"7","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/g_optimistic/article/details/86253127"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-7.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">目录

&nbsp;

1.题目：

（1）显示所有功能菜单

（2）退出系统功能

（3）新增学员功能

（4）显示所有学员功能

（5）查询学员功能

查到的话，则输出学员的全部信息，并选择你要进行的操作

&nbsp;查<em>不</em>到的话，则提示没有这个学员

2.效果：

（1）项目构架：

​

（2）显示所有功能菜单

​

​

（3）退出系统功能

（4）新增学员功能

（5）显示所有学员功能

（6）查询学员...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_34524392/article/details/113504949"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_34524392/article/details/113504949"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_34524392/article/details/113504949" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_34524392/article/details/113504949"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em>做<em>名片</em><em>管理系统</em>_用<em>Python</em>实现<em>简单</em>的<em>名片</em><em>管理系统</em></div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_34524392" target="_blank"><span class="blog-title">weixin_34524392的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-29</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					279
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_34524392/article/details/113504949" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-8.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"8","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_34524392/article/details/113504949"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-8.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">首先新建项目，包含主程序cards_main和工具库cards_tools：如下：main<em>函数</em>主主要使用while和if实现4功能切换，切换的具体操作由cards_tools中的<em>函数</em>执行。<em>不</em>说了直接上代码，代码都比较<em>简单</em>：(1)cards_main：* coding : UTF-8 *&quot;&quot;&quot;File_name : cards_main.pyAuthor : jackDate : 2018.7.18...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/fy_java1995/article/details/106771102"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-9.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"9","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/fy_java1995/article/details/106771102"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/fy_java1995/article/details/106771102" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-9.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"9","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/fy_java1995/article/details/106771102"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">使用<em>python</em>写一个<em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/fy_java1995" target="_blank"><span class="blog-title">yfy的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-15</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1051
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/fy_java1995/article/details/106771102" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-9.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"9","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/fy_java1995/article/details/106771102"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-9.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">系统需求


 
* 1. 程序启动，显示<em>名片</em><em>管理系统</em>欢迎界面，并显示功能菜单
* 2. 用户用数字选择<em>不</em>同的功能
* 3. 根据功能选择，执行<em>不</em>同的功能
* 4. 用户<em>名片</em>需要记录用户的 **姓名**、**电话**、**QQ**、**邮件**
* 5. 如果查询到指定的<em>名片</em>，用户可以选择 **修改** 或者 **删除** <em>名片</em>


步骤


	框架搭建
	
	
	新增<em>名片</em>
	
	
	显示所有<em>名片</em>
	
	
	查询<em>名片</em>
	
	
	查询成功后修改、删除<em>名片</em>
	
	
	让 <em>Python</em> 程序能够直接运行
	
01</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_41719643/article/details/107542717"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qq_41719643/article/details/107542717"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_41719643/article/details/107542717" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qq_41719643/article/details/107542717"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">18_<em>Python</em><em>基础</em>_实战（一）_<em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_41719643" target="_blank"><span class="blog-title">qq_41719643的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-23</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					231
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_41719643/article/details/107542717" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~CTRLIST~default-10.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"10","strategy":"2~default~CTRLIST~default","dest":"https://blog.csdn.net/qq_41719643/article/details/107542717"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7Edefault-10.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">1. 目标

<em>综合</em>已经学过的知识点：

变量
	<em>函数</em>
	模块
	流程控制
开发 <em>名片</em><em>管理系统</em>

2.系统需求



3.开发步骤

框架搭建
	新增<em>名片</em>
	显示所有<em>名片</em>
	查询<em>名片</em>
	查询后修改、删除<em>名片</em>
4.开发过程

4.1 框架搭建

目标：搭建系统框架

准备文件，确定文件名，保证能够在需要位置编写代码
	编写 主运行循环，实现基本的用户输入和判断
4.1.1 文件准备

 1.新建cards_main.py 保存 主程序功能代码

程序入口
	每次启动系统时，通过main这个文件启动
2....</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/pengchengliu/article/details/105841523"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-11.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"11","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/pengchengliu/article/details/105841523"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/pengchengliu/article/details/105841523" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-11.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"11","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/pengchengliu/article/details/105841523"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-11.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-11.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>综合</em>应用 &mdash;&mdash; <em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/pengchengliu" target="_blank"><span class="blog-title">liupc的学习笔记</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-29</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					225
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/pengchengliu/article/details/105841523" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-11.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"11","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/pengchengliu/article/details/105841523"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-11.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-11.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>综合</em>应用 &mdash;&mdash; <em>名片</em><em>管理系统</em>
目标
<em>综合</em>应用已经学习过的知识点：

变量
流程控制
<em>函数</em>
模块

开发 <em>名片</em><em>管理系统</em>
系统需求



程序启动，显示<em>名片</em><em>管理系统</em>欢迎界面，并显示功能菜单



**************************************************
欢迎使用<em>【</em><em>名片</em><em>管理系统</em><em>】</em>V1.0

1. 新建<em>名片</em>
2. 显示全部
3. 查询<em>名片</em>

0. 退出系统
**...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_36553865/article/details/88796169"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-12.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"12","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_36553865/article/details/88796169"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_36553865/article/details/88796169" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-12.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"12","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_36553865/article/details/88796169"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-12.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-12.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>Python</em><em>名片</em>系统</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_36553865" target="_blank"><span class="blog-title">qq_36553865的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					466
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_36553865/article/details/88796169" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-12.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"12","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/qq_36553865/article/details/88796169"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-12.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-12.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1"><em>Python</em> <em>名片</em>系统


系统需求程序启动，显示<em>名片</em><em>管理系统</em>欢迎界面，并显示功能菜单**************************************************
欢迎使用<em>【</em><em>名片</em><em>管理系统</em><em>】</em>V1.0
​

新建<em>名片</em>
显示全部
查询<em>名片</em>
​
退出系统


用户用数字选择<em>不</em>同的功能
根据功能选择，执行<em>不</em>同的功能
用...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_42172261/article/details/89508234"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-13.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"13","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42172261/article/details/89508234"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_42172261/article/details/89508234" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-13.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"13","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42172261/article/details/89508234"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-13.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-13.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em><em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_42172261" target="_blank"><span class="blog-title">_Zer0的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-25</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1195
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_42172261/article/details/89508234" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-13.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"13","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42172261/article/details/89508234"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-13.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-13.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">#cards_main.py
import cards_tools
import os
import time


while True:
    time.sleep(1)
    os.system(&quot;cls&quot;)
    cards_tools.show_menu()

    action_str = input(&quot;您希望执行的操作:&quot;)
    print(&quot;您选择的操作是 [%s]&quot; %...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_42298372/article/details/88864340"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-14.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"14","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42298372/article/details/88864340"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_42298372/article/details/88864340" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-14.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"14","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42298372/article/details/88864340"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-14.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-14.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em>学习第二天&mdash;&mdash;编写<em>名片</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_42298372" target="_blank"><span class="blog-title">weixin_42298372的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-28</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					636
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_42298372/article/details/88864340" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-14.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"14","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42298372/article/details/88864340"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-14.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-14.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">1.首先创建主<em>函数</em>，显示菜单，显示<em>不</em>同功能
import cards_tools
#无限循环，由用户决定什么条件停止运行
while True:
    # 显示功能菜单
    cards_tools.show_menu()
    action_str = input(&quot;请选择操作功能：&quot;)
    print(&quot;你选择的操作是：<em>【</em>%s<em>】</em>&quot; %action_str )
    #在编写程序时，...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/moonlightpeng/article/details/89070412"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/moonlightpeng/article/details/89070412"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/moonlightpeng/article/details/89070412" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/moonlightpeng/article/details/89070412"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">黑马<em>程序员</em> <em>Python</em>学习笔记 之  <em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/moonlightpeng" target="_blank"><span class="blog-title">moonlightpeng的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">04-07</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					1086
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/moonlightpeng/article/details/89070412" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-15.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"15","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/moonlightpeng/article/details/89070412"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-15.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">目录





目标

系统需求

步骤

01. 框架搭建

1.1 文件准备

1.2 编写主运行循环

1.3 在 cards_tools 中增加四个新<em>函数</em>

1.4 导入模块

1.5 完成 show_menu <em>函数</em>

02. 保存<em>名片</em>数据的结构

定义<em>名片</em><em>列表</em>变量

03. 新增<em>名片</em>

3.1 功能分析

3.2 实现 new_card 方法

04. 显示所有<em>名片</em>

4.1 功能分...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_42167016/article/details/81119802"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42167016/article/details/81119802"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_42167016/article/details/81119802" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42167016/article/details/81119802"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1">card_main.py</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_42167016" target="_blank"><span class="blog-title">weixin_42167016的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">07-19</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					95
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_42167016/article/details/81119802" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-16.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"16","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/weixin_42167016/article/details/81119802"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-16.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">
#! C:\Users\caofeng\AppData\Local\Programs\<em>Python</em>\<em>Python</em>36-32\<em>python</em>.exe
import card_tools


while True:
    # TODO 显示系统主菜单
    card_tools.show_menu()
    action = input(&#39;请选择您要执行的功能：&#39;)
    print(&#39;您选择...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/dm663872/article/details/101705717"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/dm663872/article/details/101705717"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/dm663872/article/details/101705717" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/dm663872/article/details/101705717"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em><em>名片</em>   项目</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/dm663872" target="_blank"><span class="blog-title">dm663872的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">09-10</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					99
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/dm663872/article/details/101705717" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-17.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"17","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/dm663872/article/details/101705717"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-17.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">---恢复内容开始---
<em>综合</em>应用 &mdash;&mdash; <em>名片</em><em>管理系统</em>
目标
<em>综合</em>应用已经学习过的知识点：


变量


流程控制


<em>函数</em>


模块


开发 <em>名片</em><em>管理系统</em>
系统需求



程序启动，显示<em>名片</em><em>管理系统</em>欢迎界面，并显示功能菜单



**************************************************欢...</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/Terminator_wh/article/details/83618437"  data-report-view='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/Terminator_wh/article/details/83618437"}'>
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/Terminator_wh/article/details/83618437" class="tit" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/Terminator_wh/article/details/83618437"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link'>
					<div class="left ellipsis-online ellipsis-online-1"><em>python</em><em>基础</em>之<em>名片</em><em>管理系统</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/Terminator_wh" target="_blank"><span class="blog-title">Terminator-H</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-01</span>
					<span class="info-block read"><img class="read-img" src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					177
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/Terminator_wh/article/details/83618437" target="_blank"  data-report-click='{"ab":"new","mod":"popu_387","extra":"{\"utm_medium\":\"distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~default-18.no_search_link\",\"dist_request_id\":\"1631862760233_85885\"}","dist_request_id":"1631862760233_85885","ab_strategy":"ctrlist","index":"18","strategy":"2~default~BlogCommendFromBaidu~default","dest":"https://blog.csdn.net/Terminator_wh/article/details/83618437"}'  data-report-query='utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7Edefault-18.no_search_link'>
				<div class="desc ellipsis-online ellipsis-online-1">一.两个文件(crad_main.py)和(crad_tools.py)
1.crad_main.py:搭建整体框架
  (1)提示用户输入信息
  (2)进入界面提示
  (3)进行判断



2.card_tools.py：各功能封装成<em>函数</em>
  (1)主界面
  (2)增加界面
  (3)显示界面
  (4)搜索界面
    (4-1)进行查找
    (4-2)找到后修改、删除、返回菜单
 ...</div>
			</a>
		</div>
	</div>
</div>
            </div>
            <div class="template-box">
                <span>©️2020 CSDN</span>
                <span>皮肤主题: 代码科技</span>
                <span> 设计师:Amelia_0503</span>
                <span>
                    <a href="https://blog.csdn.net/" class="back-home c-blue c-blue-hover c-blue-focus">返回首页</a>
                </span>
            </div>
<div class="blog-footer-bottom" style="margin-top:10px;"></div>
<script src="https://g.csdnimg.cn/common/csdn-footer/csdn-footer.js" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>        </main>
<aside class="blog_container_aside">
	<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://sslljy.blog.csdn.net" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4121","dest":"https://sslljy.blog.csdn.net","ab":"new"}'>
                <img src="https://profile.csdnimg.cn/9/0/1/3_zhiguigu" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://sslljy.blog.csdn.net" class="" id="uid" title="退休的龙叔" data-report-click='{"mod":"popu_379","spm":"1001.2101.3001.4122","dest":"https://sslljy.blog.csdn.net","ab":"new"}'>
                    <span class="name " username="zhiguigu">退休的龙叔</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years">码龄1年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="Python领域新星创作者">
                    <img src="https://img-home.csdnimg.cn/images/20210412060958.png" alt="">
                    Python领域新星创作者
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="52">
            <a href="https://sslljy.blog.csdn.net" data-report-click='{"mod":"1598321000_001","spm":"1001.2101.3001.4310"}' data-report-query="t=1">  
                <dt><span class="count">52</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click='{"mod":"1598321000_002","spm":"1001.2101.3001.4311"}' title="11">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">11</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="120">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click='{"mod":"1598321000_003","spm":"1001.2101.3001.4312"}' target="_blank">
                <dt><span class="count">120</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="1328916">  
            <dt><span class="count">132万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="8级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="https://csdnimg.cn/identity/blog8.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="36502">
            <dt><span class="count">3万+</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="57536">
            <dt><span class="count" id="fan">5万+</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="25176">
            <dt><span class="count">2万+</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="10855">
            <dt><span class="count">1万+</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="56787">
            <dt><span class="count">5万+</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer" data-report-view='{"spm":"3001.4296"}'>
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="签到新秀">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qiandao20@240.png" alt="签到新秀">
                    </div>
                </div>
                <div class="icon-badge" title="阅读者勋章Lv3">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/yuedu30@240.png" alt="阅读者勋章Lv3">
                    </div>
                </div>
                <div class="icon-badge" title="新秀勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/xinxiu@240.png" alt="新秀勋章">
                    </div>
                </div>
                <div class="icon-badge" title="持之以恒">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/chizhiyiheng@240.png" alt="持之以恒">
                    </div>
                </div>
                <div class="icon-badge" title="勤写标兵Lv3">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click='{"spm":"3001.4296"}' src="https://csdnimg.cn/medal/qixiebiaobing3@240.png" alt="勤写标兵Lv3">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/zhiguigu" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent" >关注</a>  
        </div>
    </div>
</div>
<div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog">
                    <img src="//csdnimg.cn/cdn/content-toolbar/csdn-sou.png?v=1587021042">
        </a>
    </div>
    </div>
</div><div id="asideRank">
        <a class="rank-href" href="https://blog.csdn.net/rank/list" style="background:url('https://img-home.csdnimg.cn/images/20210414070017.png') no-repeat left center;background-size:300px 44px;" target="_blank" data-report-click='{"spm":"1001.2101.3001.5847"}' data-report-view='{"spm":"1001.2101.3001.5847"}'>文章入选《全站综合热榜》</a>
</div>



<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://sslljy.blog.csdn.net/article/details/117924606" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://sslljy.blog.csdn.net/article/details/117924606","ab":"new"}'>
				Python所有方向的学习路线，你们要的知识体系在这，千万别做了无用功！
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">79178</span>
                </a>
			</li>
			<li>
				<a href="https://sslljy.blog.csdn.net/article/details/117222360" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://sslljy.blog.csdn.net/article/details/117222360","ab":"new"}'>
				有些段子，外行人根本看不懂，只有程序员看了会狂笑不止
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">72834</span>
                </a>
			</li>
			<li>
				<a href="https://sslljy.blog.csdn.net/article/details/116424778" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://sslljy.blog.csdn.net/article/details/116424778","ab":"new"}'>
				自学编程的人，90%以上都会掉进这些坑，避开这些误区能提高N倍学习效率
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">44958</span>
                </a>
			</li>
			<li>
				<a href="https://sslljy.blog.csdn.net/article/details/119183756" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://sslljy.blog.csdn.net/article/details/119183756","ab":"new"}'>
				学1个月爬虫就月赚6000？别被骗了，老师傅告诉你爬虫的真实情况！
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">42300</span>
                </a>
			</li>
			<li>
				<a href="https://sslljy.blog.csdn.net/article/details/118917510" target="_blank"  data-report-click='{"mod":"popu_541","spm":"1001.2101.3001.4139","dest":"https://sslljy.blog.csdn.net/article/details/118917510","ab":"new"}'>
				学Python该看什么书？所有方向的精华好书推荐，18年老程序员倾囊相授！
					<img src="https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png" alt="">
					<span class="read">40605</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box ">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_11347049.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_11347049.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210910094850758.jpg?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">Python新手入门教程</span>
                    </span>
                    <span class="count float-right">4篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_11125258.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_11125258.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20210609153257600.jpg?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">Python优质文章</span>
                    </span>
                    <span class="count float-right">27篇</span>
                </a>
            </li>
            <li class="">
                <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_10996901.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_10996901.html","ab":"new"}'>
                    <img src="https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                    <span class="title oneline">
                        <span class="text">编程经验</span>
                    </span>
                    <span class="count float-right">21篇</span>
                </a>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://sslljy.blog.csdn.net/article/details/116158446#comments_18346744" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18346744","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18346744","ab":"new"}'>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</a>
                <p class="comment ellipsis">
                    <a href="https://sslljy.blog.csdn.net" class="user-name" target="_blank">退休的龙叔: </a>
                    <span class="code-comments">好的</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://sslljy.blog.csdn.net/article/details/116158446#comments_18346333" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18346333","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18346333","ab":"new"}'>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/jianpengxuexikaifa" class="user-name" target="_blank">程序员漫话编程: </a>
                    <span class="code-comments">确实不错，看了入门了，大佬666，欢迎回访。</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://sslljy.blog.csdn.net/article/details/116158446#comments_18345581" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345581","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345581","ab":"new"}'>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</a>
                <p class="comment ellipsis">
                    <a href="https://sslljy.blog.csdn.net" class="user-name" target="_blank">退休的龙叔: </a>
                    <span class="code-comments">是的，加油</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://sslljy.blog.csdn.net/article/details/116158446#comments_18345580" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345580","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345580","ab":"new"}'>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</a>
                <p class="comment ellipsis">
                    <a href="https://sslljy.blog.csdn.net" class="user-name" target="_blank">退休的龙叔: </a>
                    <span class="code-comments">不客气</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://sslljy.blog.csdn.net/article/details/116158446#comments_18345574" data-report-click='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345574","ab":"new"}' data-report-view='{"mod":"popu_542","spm":"1001.2101.3001.4231","dest":"https://sslljy.blog.csdn.net/article/details/116158446#comments_18345574","ab":"new"}'>Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/m0_60651214" class="user-name" target="_blank">studier_li: </a>
                    <span class="code-comments">感谢大佬</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="https://csdnimg.cn/release/blogv2/dist/pc/img/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://sslljy.blog.csdn.net/article/details/120217658" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://sslljy.blog.csdn.net/article/details/120217658","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://sslljy.blog.csdn.net/article/details/120217658","ab":"new"}'>❤️万字【Python基础】保姆式教学❤️，小白快速入门Python！</a>
            </li>
            <li class="clearfix">
            <a href="https://sslljy.blog.csdn.net/article/details/120214801" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://sslljy.blog.csdn.net/article/details/120214801","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://sslljy.blog.csdn.net/article/details/120214801","ab":"new"}'>❤️Python面向对象保姆式教学❤️，新手速成精英之路！</a>
            </li>
            <li class="clearfix">
            <a href="https://sslljy.blog.csdn.net/article/details/120154569" target="_blank" data-report-click='{"mod":"popu_382","spm":"1001.2101.3001.4136","dest":"https://sslljy.blog.csdn.net/article/details/120154569","ab":"new"}' data-report-view='{"mod":"popu_382","dest":"https://sslljy.blog.csdn.net/article/details/120154569","ab":"new"}'>大学四年学计算机最值得看的技术书，要读就读最好的书，程序员精品书单！</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-title">2021</div> 
                <div class="archive-content">
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/09" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/09"}'>
                        <span class="time">09月</span>
                        <span class="count">6篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/08" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/08"}'>
                        <span class="time">08月</span>
                        <span class="count">10篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/07" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/07"}'>
                        <span class="time">07月</span>
                        <span class="count">9篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/06" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/06"}'>
                        <span class="time">06月</span>
                        <span class="count">11篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/05" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/05"}'>
                        <span class="time">05月</span>
                        <span class="count">9篇</span>
                        </a>
                    </div>
                    <div class="archive-item">
                        <a href="https://sslljy.blog.csdn.net/article/month/2021/04" target="_blank" data-report-click='{"mod":"popu_538","spm":"1001.2101.3001.4138","ab":"new","dest":"https://sslljy.blog.csdn.net/article/month/2021/04"}'>
                        <span class="time">04月</span>
                        <span class="count">7篇</span>
                        </a>
                    </div>
                </div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-矩形-左下视窗（自适应） -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="1894159733"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&a=707&c=0&k=&spm=1001.2101.3001.5001&d=1&t=3&u=278f20d26b2c4a38b81262461303c6c4" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class='groupfile' id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-tooltip/2.5/user-tooltip.js"></script>
<script type="text/javascript"  src="https://g.csdnimg.cn/user-medal/1.0.7/user-medal.js"></script>    </div>
<div class="recommend-right  align-items-stretch clearfix" id="rightAside" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right" >
                        <div class='flex-column aside-box groupfile' id="groupfile">
                <div class="groupfile-div">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
                <div id="recommendAdBox">
                    <div id="kp_box_479" data-pid="479"><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- PC-博客详情页-右侧视窗（自适应） -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="3484057394"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=479&a=3267&c=0&k=&spm=1001.2101.3001.4834&d=1&t=3&u=6e8c74a0f7f34bcb9933e292fc69e39f" style="display: block;width: 0px;height: 0px;"></div>
                </div>
            <div class='aside-box kind_person d-flex flex-column'>
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_11347049.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_11347049.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210910094850758.jpg?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">Python新手入门教程</span>
                                        </span>
                                        <span class="count float-right">4篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_11125258.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_11125258.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20210609153257600.jpg?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">Python优质文章</span>
                                        </span>
                                        <span class="count float-right">27篇</span>
                                    </a>
                                </li>
                                <li class="">
                                    <a class="clearfix" target="_blank" href="https://blog.csdn.net/zhiguigu/category_10996901.html" data-report-click='{"mod":"popu_537","spm":"1001.2101.3001.4137","strategy":"pc付费专栏左侧入口","dest":"https://blog.csdn.net/zhiguigu/category_10996901.html","ab":"new"}'>
                                        <img src="https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64" alt="" onerror="this.src='https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64'">
                                        <span class="title oneline">
                                            <span class="text">编程经验</span>
                                        </span>
                                        <span class="count float-right">21篇</span>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>

</div>
<div class="mask-dark"></div>
<script type="text/javascript">
    var timert = setInterval(function(){
      sideToolbar = $(".csdn-side-toolbar");
      if (sideToolbar.length > 0) {
        sideToolbar.css('cssText','bottom:64px !important;')
        clearInterval(timert);
      }
    }, 200);
</script>
<script>
    var articleId = 116158446;
    var commentscount = 21;
    var curentUrl = "https://blog.csdn.net/zhiguigu/article/details/116158446";
    var myUrl = "https://my.csdn.net/";
    var highlight = ["程序员","检验","python","综合","编程语言","很","闭包","基础","不","扎","【","名片","】","却","适合","函数","简单","基本功","列表","扎实","管理系统","看似"];//高亮数组
    var isRecommendModule = true;
    var isBaiduPre = true;
    var baiduCount = 2;
    var share_card_url = "https://blog.csdn.net/zhiguigu/article/shareArticleCardPage?article_id=116158446"
	var articleType = 1;
    var baiduKey = "Python基础综合项目【名片管理系统】，看似简单，却很适合检验基本功扎不扎实";
    var userNewReport = false;
    var needInsertBaidu = true;
    var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
    var codeStyle = "tomorrow-night";
    var baiduSearchType = "title";
    var canRead = true;
    var blogMoveHomeArticle = false;
    var showPcWindowAd = false;
    var showSearchText = "";
    var linkPage = true;
    var articleSource = 1;
    var articleReport = '{"pid": "blog", "spm":"1001.2101"}';
    var isShowToQuestion = false;
    var baiduSearchChannel = 'pc_relevant'
    var baiduSearchIdentification = '.no_search_link'
    var initRewardObject = {
        giver: currentUserName,
        anchor: username,
        articleId: articleId,
        sign: ''
    }
</script>
<script src="https://csdnimg.cn/public/sandalstrap/1.4/js/sandalstrap.min.js"></script>
<div class="skin-boxshadow"></div>
<div class="directory-boxshadow"></div>
<div class="pay-code">
    <div class="pay-money">实付<span class="pay-money-span" data-nowprice='' data-oldprice=''>元</span></div>
    <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
    <div class="content-code">
    <div id="payCode" data-id="">
            <div class="renovate">
                <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-time-out.png">
                <span>点击重新获取</span>
            </div>
        </div>
        <div class="pay-style"><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/weixin.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/zhifubao.png"></span><span><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/jingdong.png"></span><span class="text">扫码支付</span></div>
    </div>
    <div class="bt-close"><svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12"><defs><style type="text/css"></style></defs><path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path></svg></div>
    <!-- <p style="margin-top: 8px;font-size: 14px;" class="text-center">支付成功即可阅读</p> -->
    <div class="pay-balance">
    <input type="radio" class="pay-code-radio" data-type="details"> 
    <span class="span">钱包余额</span>
    <span class="balance" style="color:#FC5531;font-size:14px;">0</span>  
    <div class="pay-code-tile">
        <img src="https://csdnimg.cn/release/blogv2/dist/pc/img/pay-help.png" alt="">
        <div class="pay-code-content">
            <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
            </div>
        </div>
    </div>
    </div>
    <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="https://csdnimg.cn/release/blogv2/dist/pc/img/recharge.png" alt=""><span  >余额充值</span></a>
</div>
<div style="display:none;">
	<img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
</div>
</body>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_highlight-db1e81323a.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/pc_wap_common-6a9acd4c62.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/components/js/edit_copy_code-1320dfe85c.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.6.12/ckeditor/plugins/codesnippet/lib/highlight/styles/tomorrow-night.css">
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            qr: {
                isShow: false,
            },
            guide: {
                isShow: true
            }
        }
    }
    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            window.csdn.userLogin.loadAjax(function(res){
                if(userNewReport){
                    showReportNew(false,articleTitles);
                }else{
                    showReport(false,articleTitles);
                }
            })
        });
    })
</script>
    <script src="https://g.csdnimg.cn/baidu-search/1.0.9/baidu-search.js"  type="text/javascript"></script>
<script src="https://csdnimg.cn/release/download/old_static/js/qrcode.js"></script>
<script src="https://g.csdnimg.cn/lib/qrcode/1.0.0/qrcode.min.js"></script>
<script src="https://g.csdnimg.cn/user-ordercart/2.0.6/user-ordercart.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/user-ordertip/4.1.3/user-ordertip.js" type="text/javascript" ></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/common-24fa4dcb20.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/detail-44f0825236.min.js" type="text/javascript"></script>
<script src="https://csdnimg.cn/release/blogv2/dist/pc/js/column-8eca907613.min.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/side-toolbar/3.0/side-toolbar.js" type="text/javascript"></script>
<script src="https://g.csdnimg.cn/copyright/1.0.4/copyright.js" type="text/javascript"></script>
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
</script>
<script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none",
                ignoreClass:"title-article"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript" crossorigin src="https://g.csdnimg.cn/login-box/1.1.7/login-box.js"></script></html>
